import { View } from "../../../mvc/core/View";
import { LayerManager } from "../../manager/LayerManager";
import { EffectManager } from "../../manager/EffectManager";
import { ObjCreate } from "../common/ObjCreate";
import { ResFileConst } from "../../resource/ResFileConst";
import { ParamsConst } from "../../../common/global/ParamsConst";
import { GLoadedButton } from "../../../../com/mui/controls/GLoadedButton";
//class LinkActivePageIcon
    
    export  class LinkActivePageIcon extends View
    {
        constructor()
        {
            super();
            this.layer = LayerManager.rightTopUILayer;
            this.createChildren();
            this.addListeners();
            return;
        }

        public showLinkPageEffect(arg1: Boolean): void
        {
            var loc1=null;
            var loc2=null;
            if (arg1) 
            {
                loc1 = new Object /* flash.filters.GlowFilter */(268435302, 1, 6, 6, 4);
                loc2 = [loc1];
                EffectManager.glowFilterReg(this._linkPageBtn, loc2, 0.8, 10, 5, 0);
            }
            else 
            {
                EffectManager.glowFilterUnReg(this._linkPageBtn);
            }
            return;
        }

        /* internal  */createChildren(): void
        {
            this._linkPageBtn = ObjCreate.createGLoadedButton(ResFileConst.LinkActivePageBtn, 0, 0, 60, 50, this);
            return;
        }

        /* internal  */addListeners(): void
        {
            this._linkPageBtn.addEventListener(flash.events.MouseEvent.CLICK, this.clickLinkPageHandler);
            return;
        }

        protected clickLinkPageHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            EffectManager.glowFilterUnReg(this._linkPageBtn);
            var loc1=new Object /* flash.net.URLRequest */(ParamsConst.instance.linkActiveWebSite);
            flash.net.navigateToURL(loc1);
            return;
        }

        /* internal */ /* var */_linkPageBtn: GLoadedButton;
    }
